{% extends "base/base.html" %}

{% comment %}

 Copyright 2013 - Tom Alessi

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and 
 limitations under the License.

{% endcomment %}


{% block content %}

<b><i>PAGESPEED REPORT</i></b>

<br>
<br>


 <table class="tiny_no_border">
  <tr>
   <td>Date:<b>{{date|date:"Y-m-d H:i:s"}}</b></td>
   <td>Timezone:<b>{{TIME_ZONE}}</b></td>
   <td>Domain:<b>{{domain}}</b></td>
   <td>Url:<b>{{url}}</b></td>
   <td>Strategy:<b>{{strategy}}</b></td>
  </tr>
 </table>

<br>


<script type="text/javascript">
$(document).ready(function() {
        $("#ps_report").tablesorter(
           {
            sortList: [[2,1]]
           }
         );
});
</script>



<br>
<table id="ps_report" class="tablesorter"> 
 <thead>
 <tr>
  <th>Rule Name</th>
  <th>Score</th>
  <th>Impact</th>
  <th>Detail</th>
 </tr>
 </tread>
 <tbody>
 {% for row in report %}
 <tr>
  <td valign="top" style="text-align:left;">{{row.formattedName}}</td>
  <td valign="top" style="text-align:left;">{{row.score}}</td>
  <td valign="top" bgcolor="{{row.color}}" style="text-align:left;">{{row.impact}}</td>
  <td valign="top" style="text-align:left;" width="450"> 
  {% if row.urls %}
   <img src="/html/images/plus.gif" id="img_{{row.name}}" onclick="hide_show_img('div_{{row.name}}','img_{{row.name}}'); return false">
   <br>
   <div id="div_{{row.name}}" style="display:none; word-wrap: break-word; word-break: break-all;">
   {% for url in row.urls %}
    <b>{{url.header}}</b>
    {% for u in url.urls %}
     <li>{{u}}
    {% endfor %}
    <br>
    <br>
   {% endfor %}
  {% endif %}
   </div>
  </td>
 </tr>
{% endfor %}
 </tbody>
</table>

{% endblock %}
